local request_method = ngx.var.request_method

if request_method ~= "POST" then
    ngx.say('{"code":10000,"message":"请求方式不对","data":""}')
    return
end

local args = ngx.req.get_post_args()

local act_id = args.act_id

if nil == act_id then
    ngx.say('{"code":10000,"message":"act_id不能为空","data":""}')
    return
end

local uid = args.uid

if nil == uid then
    ngx.say('{"code":10000,"message":"uid不能为空","data":""')
    return
end

local code = args.code
if nil == code then
    local ngx.say('{"code":10000,"message":"请输入口令","data":""}')
    return
end

if #code>=10 then
    local ngx.say('{"code":10000,"message":"口令不能超过十个字节","data":""}')
    return
end